/**
 * Created with CLion.
 * Description: 
 * User: loong
 * Date: 2024/6/12
 * Time: 11:33
 */

#ifndef CARDDECK_H
#define CARDDECK_H
#include "Global.h"
using namespace std;
namespace Upgrade {
    class Card;
    class CardDeck
    {
    public:
        explicit CardDeck(int _num,int _bottomNum);

        // 洗牌
        void Shuffle();

        void Print();

        // 发牌
        std::shared_ptr<Card> Deal();

        bool HaveBottomCard(){return haveBottomCard_;};

        void SetBottomCard(int _num);

    private:
        void InitDeck();

    private:
        int                           nums_;
        int                           bottom_card_nums_;
        bool                          haveBottomCard_ = true;
        vector<std::shared_ptr<Card>> all_cards_;
    };

    using CardDeckSPtr = shared_ptr<CardDeck>;

}// namespace Upgrade

#endif//CARDDECK_H
